package com.example.administrator.personalmail.Activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.VideoView;

import com.example.administrator.personalmail.R;
import com.example.administrator.personalmail.api.Contants;

public class CreateOrderActivity extends AppCompatActivity {
    private TextView totalPrice;
    private Button handOrder;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_order);

        totalPrice = findViewById(R.id.tv_total);
        handOrder = findViewById(R.id.btn_createOrder);
        handOrder.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                CreateOrderActivity.this.finish();
                setResult(Contants.REQUEST_SUCCESS);
                Toast.makeText(CreateOrderActivity.this,"支付成功",Toast.LENGTH_SHORT).show();
            }
        });

        String sum = getIntent().getStringExtra("sum");

        totalPrice.setText("总计："+sum+" 元");

    }
}
